package com.yinbao.testservice;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * Created by xing on 2016/11/10.
 */
public class TestBroadcastActivity extends BroadcastReceiver {
    private static final String TAG = "TestBroadcastActivity";

    @Override
    public void onReceive(Context context, Intent intent) {
        switch (intent.getAction()) {
            //唤醒后发送
            case Intent.ACTION_SCREEN_ON:
                Log.e(TAG, "唤醒广播");
                break;
            //待机前发送
            case Intent.ACTION_SCREEN_OFF:
                Log.e(TAG, "待机广播");

                break;


        }
    }
}
